import { FC, useEffect } from 'react';
import SimpleList from '@/components/SimpleList';
import { useModel } from 'umi';
const columns: any[] = [
  {
    title: '行政处罚决定书文号',
    dataIndex: 'L001',
    width: 564,
  },
  {
    title: '违法行为类型',
    dataIndex: 'L002',
    width: 330,
  },
  {
    title: '行政处罚内容',
    dataIndex: 'L003',
    width: 370,
  },
  {
    title: '做出行政处罚决定日期',
    dataIndex: 'L004',
    width: 465,
  },
];

const AdministrativeSanction: FC = () => {
  const { administrativeSanction, getAdministrativeSanction } =
    useModel('company');
  useEffect(() => {
    const id = window.sessionStorage.getItem('companyId') || '';
    getAdministrativeSanction({ id });
  }, []);
  return (
    <SimpleList
      width={1790}
      height={220}
      columns={columns}
      dataSource={administrativeSanction}
      headerStyle={{
        height: 42,
        backgroundColor: 'rgba(141, 141, 141, 0.1)',
      }}
      sortNumber
      sortText="序号"
      rowStyle={{
        height: 42,
      }}
      sortStyle={{
        width: 88,
      }}
      hover
      odd
      rowBackground
    />
  );
};
export default AdministrativeSanction;
